package cn.sciento.farm;

import cn.sciento.autoconfigure.iam.EnableSTongIam;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * 不启用认证服务器
 */
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class, ReactiveUserDetailsServiceAutoConfiguration.class,
        ReactiveSecurityAutoConfiguration.class})
@EnableSTongIam
@EnableDiscoveryClient
public class FarmSystemApplication {

    public static void main(String[] args) {
        try {
            new SpringApplicationBuilder(FarmSystemApplication.class)
                    .run(args);
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }
}
